package com.shelpe.services.scheduler.item.authorize;

import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;

import com.shelpe.services.scheduler.dto.RptCustomerDto;
import com.shelpe.services.scheduler.po.SyncLog;
import com.shelpe.services.scheduler.syncclient.AuthorizeClient;
import com.shelpe.services.scheduler.util.Util;

public class AuthorizeProcessor implements ItemProcessor<Long, SyncLog>{

	@Autowired
	private AuthorizeClient authClient;
	
	@Override
	public SyncLog process(Long item) throws Exception {
		// TODO Auto-generated method stub
		RptCustomerDto dto = authClient.syncAuthorizeByUser(item);
		
		return Util.convert(dto);
	}

}
